<template>
    <table class="time-tatle">
        <thead>
            <tr>
                <th></th>
                <th>周一</th>
                <th>周二</th>
                <th>周三</th>
                <th>周四</th>
                <th>周五</th>
                <th>周六</th>
                <th>周日</th>
            </tr>
        </thead>
        <tbody>
            <tr v-for="(val,i) in CourseArrangeList" :key="i">
                <td class="first_td">{{val.name.zh}}</td>
                <td v-for="(val2,i2) in val.week" :key="i2">
                    <div v-if="val2.course == null">
                    </div>
                    <div class="courseColor" v-else>
                        <p>{{val2.course.course_name.zh?val2.course.course_name.zh:val2.course.course_name.mn}}</p>
                        <p v-if="val2.course.course !=null">{{val.week[i2].course.course.course_name.zh}}</p>
                        <p v-if="val2.teacher != null">({{val2.teacher.teacher_name.zh}})</p>
                        <p v-if="val2.course.eclass != null">({{val2.course.eclass.eclass_name.zh}})</p>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</template>
<script>
    export default {
        props:{
            'CourseArrangeList':Array
        },
        data(){
            return{

            }
        },

    }
</script>

<style lang="less">
    .time-tatle {
        width: 1080;
        display: table;
        
        thead {
            width: 1080px;
            display: block;
            margin-bottom:5px;
            tr {
                border: 1px solid #ddd;
                width: 1080px;
                height:60px;
                th {
                    width: 130px;
                }
            }
        }
        tbody {
            width: 1080px;
            tr {
                display: block;
                width: 1080px;
                height: 70px;
                line-height: 50px;							
                td {							
                    height: 64px;
                    border: 1px solid #ddd;
                    width: 130px;
                    margin-right:5px;
                    text-align: center;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                    &.first_td {
                        background: #ecf3fd;
                    }
                    div {
                        height: 64px;
                    }
                    .courseColor {
                        border-left: 2px solid #31a7f0;
                        background: linear-gradient(0deg, #f7f7f7, white);
                        color: #31a7f0;
                        width: 128px;
                        line-height: 34px;
                        font-size: 12px;
                        &:hover {
                            border-left: 2px solid #ff892f;
                            color: #ff892f;
                        }
                    }
                }
            }
        }
    }
</style>

